import React from "react";
import { BrowserRouter, Routes, Route, Link } from "react-router-dom";
import Login from "../pages/Login";
import Manage from "../pages/Manage";
import Users from "../pages/Users";
import Order from "../pages/Order";
import Shops from "../pages/Shops";
import Type from "../pages/Type";
import Analysis from "../pages/Analysis";
import Reg from "../pages/Reg";

export default function index() {
  return (
    <BrowserRouter>

      <Routes>
        <Route path="/" element={<Login />}></Route>
        <Route path='/reg' element={<Reg />}></Route>
        <Route path="/login" element={<Login />}></Route>
        <Route path="/manage" element={<Manage />}>
          <Route index element={<Users />}></Route>
          <Route path="users" element={<Users />}></Route>
          <Route path="order" element={<Order />}></Route>
          <Route path="shops" element={<Shops />}></Route>
          <Route path="types" element={<Type />}></Route>
          <Route path="analysis" element={<Analysis />}></Route>

        </Route>
      </Routes>
    </BrowserRouter>
  );
}
